#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

#AC_PREREQ(2.61)
AC_INIT([closure], [0.1.3], [])
AM_INIT_AUTOMAKE(closure, 0.1.3)

AM_MAINTAINER_MODE

AM_PROG_LIBTOOL

# translation
GETTEXT_PACKAGE=closure
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
ALL_LINGUAS=""

IT_PROG_INTLTOOL([0.34])
AM_GLIB_GNU_GETTEXT

slicelocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(slicelocaledir)


# Checks for programs.
AM_PATH_PYTHON() #2.4, [HAVE_PYTHON=yes], [HAVE_PYTHON=no])

#echo $PYTHON_VERSION

# Checks for libraries.
AM_PATH_GLIB_2_0(2.8.0,,,gobject)

#PKG_CHECK_MODULES(X11, [ x11 xproto ])
#PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10])
#PKG_CHECK_MODULES(PYGTK, [pygtk-2.0 >= 2.10])
#PKG_CHECK_MODULES(LIBGNOME, [ libgnome-2.0 ])
#PKG_CHECK_MODULES(GNOME_PYTHON, [ gnome-python-2.0 >= 2.16 ])
#PKG_CHECK_MODULES(GNOME_DESKTOP, [ gnome-desktop-2.0 >= 2.16 ])
#PKG_CHECK_MODULES(GNOME_PYTHON_DESKTOP, [ gnome-python-desktop-2.0 >= 2.16 ])
#PKG_CHECK_MODULES(GCONF, [ gconf-2.0 ])
#PKG_CHECK_MODULES(CAIRO, [ cairo >= 1.2 ])
#PKG_CHECK_MODULES(CAIROSVG, [ cairo-svg ])
#PKG_CHECK_MODULES(CAIROGLITZ, [ cairo-glitz ],,[HAVE_GLITZ="no"])
#if test -n "$HAVE_GLITZ"; then
#	AC_MSG_WARN( "Build Cairo with glitz support for hardware acceleration." )
#fi
#PKG_CHECK_MODULES(PYCAIRO, [ pycairo >= 1.2 ])
#PKG_CHECK_MODULES(PANGO, [ pango >= 1.14 ])
#PKG_CHECK_MODULES(PANGOCAIRO, [ pangocairo ])
#PKG_CHECK_MODULES(LIBRSVG, [ librsvg-2.0 >= 2.16 ])

AC_PATH_PROG( GCONFTOOL, gconftool-2, no )
if test "x$GCONFTOOL" = "xno"; then
	AC_MSG_ERROR( [gconftool-2 binary not found in your path] )
fi

AM_GCONF_SOURCE_2

GCONF_SCHEMA_FILE_DIR=/etc/gconf/schemas
GCONF_CONFIG_SOURCE=
AC_ARG_ENABLE(gconf-source, [  --enable-gconf-source=sourceaddress      Where to install schema files.],GCONF_CONFIG_SOURCE=$enable_gconf_source,)

if test "x$GCONF_CONFIG_SOURCE" = "x"; then
    GCONF_CONFIG_SOURCE="xml::\${DESTDIR}\${sysconfdir}/gconf/gconf.xml.defaults"
fi

AC_SUBST(GCONF_CONFIG_SOURCE)
AC_SUBST(INSTALL_GCONF_CONFIG_SOURCE)

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.

AC_CONFIG_FILES([Makefile src/Makefile bin/Makefile data/Makefile po/Makefile.in])
AC_OUTPUT
